package com.crazy.model.major.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;

/**
 * <p>
 * 用户-角色关联表
 * </p>
 *
 * @author ${author}
 * @since 2020-12-24
 */
@TableName("T_USER_ROLE_RELATION")
public class TUserRoleRelation extends Model<TUserRoleRelation> {

    /**
    * 所有字段名
    */
    public static class Columns {
        /**
        * 
        */
        public static final String id = "ID";
        /**
        * 
        */
        public static final String userId = "USER_ID";
        /**
        * 
        */
        public static final String roleId = "ROLE_ID";
    }

    @TableId(value = "ID", type = IdType.AUTO)
    private Long id;

    @TableField("USER_ID")
    private Long userId;

    @TableField("ROLE_ID")
    private Long roleId;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getRoleId() {
        return roleId;
    }

    public void setRoleId(Long roleId) {
        this.roleId = roleId;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "TUserRoleRelation{" +
        "id=" + id +
        ", userId=" + userId +
        ", roleId=" + roleId +
        "}";
    }
}
